<template>
  <view>
    <view class="search-box">
      <uni-search-bar @confirm="search" @input="input" ></uni-search-bar>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        
      };
    },
    methods:{
      input(e){
        console.log(e)
      }
    }
  }
</script>

<style lang="scss">
.search-box{
  position: sticky; // 设置定位效果为“吸顶”
  top: 0; // 吸顶的“位置”
  z-index: 999; // 提高层级，防止被轮播图覆盖
}
</style>
